/** \file

\author Pablo Haramburu
Copyright: 
	Copyright (C)2010 Pablo Haramburu.
License: 
	This file is part of mundial2010.

	mundial2010 is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	mundial2010 is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with mundial2010.  If not, see <http://www.gnu.org/licenses/>.
*/

// Generated by DialogBlocks (unregistered), 04/06/2010 13:42:38

#ifndef _SHOTANIMATIONDIALOG_H_
#define _SHOTANIMATIONDIALOG_H_


/*!
 * Includes
 */

////@begin includes
////@end includes

#include "AppModel.h"

/*!
 * Forward declarations
 */

////@begin forward declarations
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_SHOTANIMATIONDIALOG 10009
#define ID_GOALKEEPER_TEXTCTRL 10010
#define ID_TESTFILE_TEXTCTRL 10011
#define ID_THE_FIELD_PANEL 10012
#define SYMBOL_SHOTANIMATIONDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_SHOTANIMATIONDIALOG_TITLE wxGetTranslation(wxString(wxT("Animaci")) + (wxChar) 0x00F3 + wxT("n de un tiro"))
#define SYMBOL_SHOTANIMATIONDIALOG_IDNAME ID_SHOTANIMATIONDIALOG
#define SYMBOL_SHOTANIMATIONDIALOG_SIZE wxSize(400, 300)
#define SYMBOL_SHOTANIMATIONDIALOG_POSITION wxDefaultPosition
////@end control identifiers


/*!
 * ShotAnimationDialog class declaration
 */

class ShotAnimationDialog: public wxDialog
{    
    DECLARE_DYNAMIC_CLASS( ShotAnimationDialog )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    ShotAnimationDialog();
    ShotAnimationDialog( wxWindow* parent, wxWindowID id = SYMBOL_SHOTANIMATIONDIALOG_IDNAME, const wxString& caption = SYMBOL_SHOTANIMATIONDIALOG_TITLE, const wxPoint& pos = SYMBOL_SHOTANIMATIONDIALOG_POSITION, const wxSize& size = SYMBOL_SHOTANIMATIONDIALOG_SIZE, long style = SYMBOL_SHOTANIMATIONDIALOG_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_SHOTANIMATIONDIALOG_IDNAME, const wxString& caption = SYMBOL_SHOTANIMATIONDIALOG_TITLE, const wxPoint& pos = SYMBOL_SHOTANIMATIONDIALOG_POSITION, const wxSize& size = SYMBOL_SHOTANIMATIONDIALOG_SIZE, long style = SYMBOL_SHOTANIMATIONDIALOG_STYLE );

    /// Destructor
    ~ShotAnimationDialog();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin ShotAnimationDialog event handler declarations

    /// wxEVT_SIZE event handler for ID_THE_FIELD_PANEL
    void OnSize( wxSizeEvent& event );

    /// wxEVT_PAINT event handler for ID_THE_FIELD_PANEL
    void OnPaint( wxPaintEvent& event );

////@end ShotAnimationDialog event handler declarations

////@begin ShotAnimationDialog member function declarations

    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////@end ShotAnimationDialog member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();

////@begin ShotAnimationDialog member variables
    wxTextCtrl* m_goalkeeper;
    wxTextCtrl* m_testfile;
    wxPanel* m_theField;
    wxButton* m_cancelBtn;
////@end ShotAnimationDialog member variables

	void OnTimer(wxTimerEvent& event);

	void setSimulation(const std::vector<SimulationStep> & simulation);

private:
	wxTimer m_timer;
	std::vector<SimulationStep> m_simulation;
	size_t m_currentStep;
};

#endif
    // _SHOTANIMATIONDIALOG_H_
